package com.matrix.draft.rabbitmqspringboot.handler;

import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 异常处理专用
 */
@RestControllerAdvice
public class ExceptionHandler {

    @org.springframework.web.bind.annotation.ExceptionHandler(Exception.class)
    String handleException(Exception e) {
        return new StringBuilder().append("*** ").append(e.getMessage()).append(" ***").toString();
    }

}
